//
//  CKFavorViewController.m
//  ComicKuaiKan
//
//  Created by xin on 2017/8/17.
//  Copyright © 2017年 zwei. All rights reserved.
//

#import "CKFavorViewController.h"
#import <Masonry.h>

@interface CKFavorViewController () <UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSArray * listArray;

@end

@implementation CKFavorViewController

- (UITableView *)tableView
{
    if (!_tableView) {
        _tableView = [[UITableView alloc] init];
        _tableView.delegate = self;
        _tableView.dataSource = self;
    }
    return _tableView;
}

- (NSArray *)listArray
{
    if (!_listArray) {
        _listArray =@[
        @{@"name":@"无线局域网",@"key":@"App-Prefs:root=WIFI"},
        @{@"name":@"蓝牙",@"key":@"App-Prefs:root=Bluetooth"},
        @{@"name":@"蜂窝移动网络",@"key":@"App-Prefs:root=MOBILE_DATA_SETTINGS_ID"}];
    }
    return _listArray;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view addSubview:self.tableView];
    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.listArray.count;
}

@end
